package his.controller;


import his.entity.FmedItem;


import his.service.FmedItem2Service;
import org.example.his.common.api.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/patient")
public class FmedItemController {
    @Autowired
    FmedItem2Service fmedItem2Service;

    /**
     * 查看已开处方API
     * @param token
     * @return List<fmedItem>
     *    测试URL：http://127.0.0.1:9090/patient/fmeitem_manage/search?=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6IjEyMyIsIlVzZXJJRCI6IjEyMyIsInN1YiI6ImxvZ2luVG9rZW4iLCJleHAiOjE2ODkxNjE1MDksImp0aSI6ImMzODg3N2Q2LTdlZTYtNDZkYi1iN2MzLTE2ZmQzMTAyZTVjNCJ9.HmLX3ChXtn7f7dMaYkDPV8yMoKooEekfoj9x0FIrFLw
     *
     */
    @GetMapping("/fmeitem_manage/search")
    public CommonResponse<List<FmedItem>> check_manageDetailToFmeditem_get(
            @RequestParam("token") String token
    ){
        CommonResponse<List<FmedItem>> commonResponse=    fmedItem2Service.check_manageDetailToFmeditem_get1(token);
        return commonResponse;
    }


}
